import request from '@/utils/request'
import type { Tag } from './type'
//获取所有标签
export const getAllTagsAPI = () => {
  return request.get<any, any>('/codeDuckTag/listAndQuestionCategory')
}
//添加修改标签
export const addOrUpdateTagAPI = (data: Tag) => {
  return request.post<any, any>('/codeDuckTag/saveOrUpdate', data)
}
//删除标签
export const deleteTagAPI = (ids: string[]) => {
  return request.post<any, any>(`/codeDuckTag/removeBatchByIds`,ids)
}
